package com.android.jay.lib_image_loader;

import io.reactivex.Observable;
import io.reactivex.ObservableEmitter;
import io.reactivex.ObservableOnSubscribe;
import io.reactivex.Observer;
import io.reactivex.disposables.Disposable;

/**
 * Created by wzp on 2020/1/3 0003.
 * <p>
 * 描述  ：todo
 */
public class RxjavaTest {


      static Observable observable = Observable.create(new ObservableOnSubscribe<String>() {
        @Override
        public void subscribe(ObservableEmitter<String> emitter) throws Exception {

            emitter.onNext("连载");
            emitter.onComplete();


        }
    });





  static   Observer<String> reader = new Observer<String>(){


        @Override
        public void onSubscribe(Disposable d) {

        }

        @Override
        public void onNext(String s) {

        }

        @Override
        public void onError(Throwable e) {

        }

        @Override
        public void onComplete() {

        }
    };


    public static void main(String[] args) {
        observable.subscribe(reader);
    }



}
